package com.clinic.entity.gui;

import java.util.Date;
import java.util.List;

import com.clinic.util.CommonUtil;

public class GuiPrescription {
	
	private long prescriptionId;
	private GuiPatient patient;
	private GuiPrescription rootPrescription;
	private GuiPrescription prevPrescription;
	private int term;
	private String termString;
	private List<GuiDrugIssue> drugIssueList;
	private List<GuiSyptom> syptomList;
	private String symptomDuration;
	private String diagnosticDescription;
	private String comment;
	private Date date;
	
	public boolean isAvailable() {
		return patient != null;
	}
	
	public boolean isExistRootPrescription() {
		return rootPrescription != null;
	}

	public boolean isExistPrevPrescription() {
		return prevPrescription != null;
	}
	
	public long getPrescriptionId() {
		return prescriptionId;
	}

	public void setPrescriptionId(long prescriptionId) {
		this.prescriptionId = prescriptionId;
	}

	public GuiPatient getPatient() {
		return patient;
	}
	
	public void setPatient(GuiPatient patient) {
		this.patient = patient;
	}
	
	public GuiPrescription getRootPrescription() {
		return rootPrescription;
	}
	
	public void setRootPrescription(GuiPrescription rootPrescription) {
		this.rootPrescription = rootPrescription;
	}

	public GuiPrescription getPrevPrescription() {
		return prevPrescription;
	}

	public void setPrevPrescription(GuiPrescription prevPrescription) {
		this.prevPrescription = prevPrescription;
	}

	public int getTerm() {
		return term;
	}

	public void setTerm(int term) {
		this.term = term;
	}

	public String getTermString() {
		return termString;
	}

	public void setTermString(String termString) {
		this.termString = termString;
	}

	public List<GuiDrugIssue> getDrugIssueList() {
		return drugIssueList;
	}

	public void setDrugIssueList(List<GuiDrugIssue> drugIssueList) {
		this.drugIssueList = drugIssueList;
	}

	public List<GuiSyptom> getSyptomList() {
		return syptomList;
	}

	public void setSyptomList(List<GuiSyptom> syptomList) {
		this.syptomList = syptomList;
	}

	public String getSymptomDuration() {
		return symptomDuration;
	}

	public void setSymptomDuration(String symptomDuration) {
		this.symptomDuration = symptomDuration;
	}

	public String getDiagnosticDescription() {
		return diagnosticDescription;
	}

	public void setDiagnosticDescription(String diagnosticDescription) {
		this.diagnosticDescription = diagnosticDescription;
	}

	public String getComment() {
		return comment;
	}

	public void setComment(String comment) {
		this.comment = comment;
	}
	
	public String getDateString() {
		return CommonUtil.getDateStringFormatByDate(date);
	}
	
	public void setDateString(String dobString) {
		this.date = CommonUtil.getDateByStringFormat(dobString);
	}

	public boolean hasExistDate() {
		return date != null;
	}
	
	public Date getDate() {
		return date;
	}

	public void setDate(Date date) {
		this.date = date;
	}

}
